unit Usuario;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, DB, StdCtrls, Mask, DBCtrls, ExtCtrls, Grids, DBGrids, SqlExpr,
  Provider, DBClient, DBLocal, DBLocalS, Buttons;

type
  TFrmUsuarios = class(TForm)
    DBNavigator1: TDBNavigator;
    DtsUsuarios: TDataSource;
    DBGrid1: TDBGrid;
    BitBtn1: TBitBtn;
    procedure FormShow(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure BitBtn1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FrmUsuarios: TFrmUsuarios;

implementation

uses DMCaixa;

{$R *.dfm}

procedure TFrmUsuarios.FormShow(Sender: TObject);
begin
  DtsUsuarios.DataSet.Open;
end;

procedure TFrmUsuarios.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  DtsUsuarios.DataSet.Close;
  Action := cafree;
end;

procedure TFrmUsuarios.BitBtn1Click(Sender: TObject);
begin
 if DtsUsuarios.DataSet.State= dsEdit
  then (DtsUsuarios.DataSet as TSqlClientDataSet).ApplyUpdates(0);
end;

end.
